<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class CreateExamtopicsTable extends Migration
{
    /**
     * Run the migrations.
     * @return void
     */
    public function up()
    {
        Schema::create('examtopics', function (Blueprint $table) {
            $table->increments('id');
            $table->unsignedInteger('f_id')->default(0)->comment('父Id');
            $table->tinyInteger('type')->default(0)->comment('题型');
            $table->text('topic')->nullable()->comment('题目');
            $table->text('options')->nullable()->comment('选项');
            $table->text('answer')->nullable()->comment('答案');
            $table->dateTime('created_at')->nullable()->comment('创建时间');
            $table->dateTime('updated_at')->nullable()->comment('更新时间');
        });
    }

    /**
     * Reverse the migrations.
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('examtopics');
    }
}
